This section describes the methods applicable to Studio tools.
| Method | Description | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
AboutBox |
The AboutBox method displays an About dialog box for the control. |
|||||||||||||
|
The AddItem method adds an item to the combo box along with an associated value. |
||||||||||||||
|
The AddPoint method adds a new point record, given a service name (PNT, UIS or CVS) and a list of point attributes/value pairs. The list of point attributes provided must include the minimum set (as specified in the XML schema) to establish a valid point record. The minimum set is comprised of the SITE, SERVICE, Long Point ID, and/or Facility ID and Uniform Data Code. |
||||||||||||||
|
The AddSeriesDialog method calls the Series dialog box where you can add a new series to your trend. |
||||||||||||||
|
The AddString method adds an item and returns the index position at which the item was added. |
||||||||||||||
|
The AlarmAcknowledge method acknowledges an alarm. |
||||||||||||||
|
The Cancel method closes an object and TheView. |
||||||||||||||
|
The CaptureMouse method forces mouse events to fire. While the mouse is being captured, mouse events will continue to fire on the capturing entity regardless of current mouse position. This function better facilitates dragging objects on views, such as splitters to allow for more flexible layout capabilities. Automatically released on left mouse button release. Context menus are not displayed while capturing. If the function is called on a windowed tool, the function sets capture to that window. If called on a non-windowed tool, it sets capture to The View and tracks which tool is "captured," altering its mouse event functions to always fire for that tool until released. |
||||||||||||||
|
The Clear method clears the contents and values of the object. |
||||||||||||||
|
The ClearFocus method removes keyboard and mouse focus from child controls. |
||||||||||||||
|
The ClearMenu method clears all custom items from the context menu. Syntax
Parameters
Return Values
|
||||||||||||||
|
ClearNoteSelection |
ClearNoteSelection deselects every note label in a Trend Tool. |
|||||||||||||
|
The DeleteAllSeries method removes all series from a trend. |
||||||||||||||
|
The DeleteItem method deletes the item at the specified index. If the index is not found, all items remain unchanged. |
||||||||||||||
|
The DeleteSeries method deselects trend(s) from a check list that was created by using the Microsoft ListView control. |
||||||||||||||
|
The DeleteString method deletes the item at the specified index. Returns the number of items remaining in the list. If the index is not found, all items remain unchanged, and -1 is returned. |
||||||||||||||
|
The DeselectAll method clears selection of all tools and controls on TheView. See [ContextMenuAutoSelect] for more information. |
||||||||||||||
|
The EditAxesDialog method calls the Axis Configuration dialog where you can edit an axis in the trend. |
||||||||||||||
|
The EditItem method replaces the current item associated with the given value with a new string. If the value is not found, all items remain unchanged. |
||||||||||||||
|
The EditSeriesDialog method calls the Series dialog box where you can edit a series in the trend. |
||||||||||||||
|
The Export method exports the contents of the grid to a temporary CSV file and opens the file with the default spreadsheet viewer for the user to view and save to disk. |
||||||||||||||
|
ExportAsImage |
The ExportAsImage method allows export of an image of a trend. |
|||||||||||||
|
The ExportToXml method dumps the data in the dictionary to an XML string. |
||||||||||||||
|
FindObject |
The FindObject method returns the index of the object with the given object code. Returns -1 if the object is not found. |
|||||||||||||
|
The FormFind method returns a handle to another screen with the given form code (set with the (FormCode) property). |
||||||||||||||
|
GetAlarmLimitInfoXml |
The GetAlarmLimitInfoXml method returns an XML string of the trend’s alarm limit configuration. |
|||||||||||||
|
GetAxisById |
The GetAxisById method returns the configured (XML) axis index number for a given axis ID number. |
|||||||||||||
|
GetCount |
The GetCount method returns the number of items in the box. Same as GetNumItems. |
|||||||||||||
|
The GetCurSel method returns the index of the current selection. |
||||||||||||||
|
GetDisplayedNotes |
GetDisplayedNotes returns an array of DisplayNote objects that are currently displayed in the view window of the Trend Tool. |
|||||||||||||
|
The GetDlgCtrlID method returns the numeric resource identifier of the control within TheView. |
||||||||||||||
|
The GetGroup method returns the object group to which an object belongs, and returns null if the object does not belong to a group. The GroupID property returns the GroupID. Calling GetGroup is equivalent to calling TheView GetGroupByID and passing the value of the object’s GroupID property, and is provided for convenience. |
||||||||||||||
|
The GetGroupById method returns a reference to the actual object group for a given GroupID. The same thing that you would get if you referenced the group directly by name in script. |
||||||||||||||
|
The GetLineCount method returns the number of lines of text in the edit box. |
||||||||||||||
|
The GetLineOfText method returns the line of text at the specified line index. Line indexing is zero-based. If the line does not contain text, an empty string is returned. |
||||||||||||||
|
GetNumItems |
The GetNumItems method returns the number of items in the box. Same as GetCount(). |
|||||||||||||
|
The GetObject method returns a handle to an object on TheView with the given index. Use the FindObject method to get an object’s index. |
||||||||||||||
|
The GetPoint method returns point data for an object. |
||||||||||||||
|
The GetPointX method returns the distance from the left edge of TheView of the given point. Points are indexed 0 to N-1, where N is the number of points on the path (see the NumberOfPoints method below). |
||||||||||||||
|
The GetPointY method returns the distance from the top edge of TheView of the given point. Points are numbered 0 to N-1, where N is the number of points on the path (see the NumberOfPoints method below). |
||||||||||||||
|
GetSelectedAlarmLimitSeries |
The GetSelectedAlarmLimitSeries method returns an index of series currently selected to have its alarm limits displayed. |
|||||||||||||
|
GetSelectedNote |
The GetSelectedNote method returns the SITE.SERVICE~NOTENUMBER of the currently selected note label. A note's database key with no preceding zeroes makes up NOTENUMBER. Syntax
Parameters
Return Values
See also Notes. |
|||||||||||||
|
The GetSelectedText method returns the text currently in the box. |
||||||||||||||
|
The GetTemplateXml method returns properties in XML format without Point Tag specifiers. |
||||||||||||||
|
The GetText method returns the text of the item at the given index. If the index is not found, this function returns an empty string. |
||||||||||||||
|
The GetValuesAtTime method returns the value of a series at a time slice. |
||||||||||||||
|
The GetWindowText method returns the text currently in the box. |
||||||||||||||
|
The HistoryAlarms method calls the Alarm History dialog box, which shows the alarm history of an individual alarm, and provides options for showing only particular types of alarm events. See Alarm History for more information. |
||||||||||||||
|
The HistoryValues method calls the History Values dialog box, which shows all the history records for a given point, including additional information if the history name came from the PNT. See History Records for more information. |
||||||||||||||
|
The HyperLink method opens a new view window at the given file path (standard or BLOB). The SiteService and Facility properties of the new screen can be set using the parameters. Use "" for these parameters if you don’t want to specify a site, service, and/or facility. Returns a value indicating success (True) or failure (False) of the function. |
||||||||||||||
|
The HyperLinkAndClose method opens a new view window at the given file path (standard or BLOB) and closes the current view. If the file was not found, a message box displays, and the current view remains open. The SiteService and Facility properties of the new screen can be set using the parameters. Use "" for these parameters if you don’t want to specify a site, service, and/or facility. Returns a value indicating success (True) or failure (False) of the function. |
||||||||||||||
|
The HyperLinkEx method opens a new view window at the given file path (standard or BLOB). Optionally, this method closes the current view and/or opens multiple instances of the same studio screen. In contrast, the Hyperlink method will only allow you to have one instance of the called window open at a time. The SiteService and Facility properties of the new screen can be set using the parameters. Use "" for these parameters if you don’t want to specify a site, service, and/or facility. Set the CloseCallingScreen property to True to close the calling screen. Set the OpenMultipleInstances property to True to allow the method to open a new instance of the called screen. Returns a value indicating success (True) or failure (False) of the function. |
||||||||||||||
|
See EventHyperLinkSys for more information. |
||||||||||||||
|
The ImportFromXml method loads data from the dictionary object in XML form. The Boolean parameter in ImportFromXml determines whether or not duplicate points will be replaced from the stored XML. |
||||||||||||||
|
The ImportScriptFile method provides built-in support for importing separate script files directly in script, facilitating faster screen initialization. The method is declared in the Declarations section of the screen. It takes in two parameters:
Example fileName = "Global.txt" filePath = "[10003]CYGDEMO.BSS\Include\" or "C:\Scripts\Include"
|
||||||||||||||
|
The IncrValue method toggles the value (checked or unchecked) of the check box. |
||||||||||||||
|
The InsertString method inserts an item at the given index. All subsequent items are pushed up by one index number. Returns -1 if the index is not found, otherwise returns the index. |
||||||||||||||
|
The IsFormOpen method returns True if a form with the given FormCode is currently open, otherwise returns False. |
||||||||||||||
|
The IsSelected method indicates if the tool or control is selected. Can be used with [ContextMenuAutoSelect]. |
||||||||||||||
|
The LayerName method gets the name of the layer on which the object resides. |
||||||||||||||
|
The ListGroupIDs method returns a list of the GroupIDs for the objects groups on the screen. |
||||||||||||||
|
The Maximize method maximizes the trend. When entering maximization mode, the Maximize parameter value passed in is "True." When exiting maximization mode, the Maximize parameter value passed in is "False." |
||||||||||||||
|
The Move method moves an object by the specified amount, relative to its current position. |
||||||||||||||
|
The NotifySelChange method forces a complete refresh of the tool and any connected/affected objects. For example, when used with a Group Navigation Bar, NotifySelChange forces a filter change on a Group Navigation Bar to apply to an associated Group Grid object. |
||||||||||||||
|
NumberOfPoints |
The NumberOfPoints method returns the number of points in the path. A point is considered to be a location at which the path changes direction, or an end point. |
|||||||||||||
|
The OnUpdate method updates the control to ensure that any property modifications have taken effect. |
||||||||||||||
|
The OnUpdateResize method updates the control to ensure that any modifications to its boundary have taken effect. |
||||||||||||||
|
The OnUpdateStyle method updates the control to ensure that any modifications to its style properties have taken effect. |
||||||||||||||
|
The OpenDoc method opens a .csf screen file at the given location. Nothing happens if the file is not found. |
||||||||||||||
|
The Print method prints the contents of the control, grid, or viewer. When this method is called, the Print dialog box is shown to allow configuration. |
||||||||||||||
|
The PrintToDefaultPrinter method prints a trend grid to the default printer. |
||||||||||||||
|
This method is not used. |
||||||||||||||
|
The ReadFromFile method reads the trend from a file. |
||||||||||||||
|
This method is not used. |
||||||||||||||
|
The Refresh method refreshes the contents of the control from the Current Value Service (CVS). |
||||||||||||||
|
The RegisterPointForChangeNotice method registers an unrelated point on a screen that may change its value. Used in conjunction with EventPointChange. |
||||||||||||||
|
The RemoveObjectMenuItem method removes an item from the context menu. Example
|
||||||||||||||
|
The ResetContent method clears all of the items in the box. |
||||||||||||||
|
For objects, the Restart method stops and restarts Run mode. For TheFrame/TheView, the Restart method restarts TheView with new site, service, and facility information, if applicable. See also RestartSoft. |
||||||||||||||
|
For the Group Grid Tool and Trend Tool, the RestartSoft method stops and restarts Run mode. For TheFrame/TheView, the RestartSoft method restarts TheView with new site, service, and facility information, if applicable. See also Restart. |
||||||||||||||
|
The RunChange method runs the object’s EventChange event code. |
||||||||||||||
|
The RunClick method runs the object’s EventClick event code. |
||||||||||||||
|
The RunInitialize method runs the object’s EventInitialize event code. |
||||||||||||||
|
This method is not used. |
||||||||||||||
|
The RunTerminate method runs TheView’s EventTerminate event code. |
||||||||||||||
|
The SendSharedMessage method on the TheView sends a message to another instance of CygNet Studio or CygNet Vision. The method contains three parameters: Parameters
Example
|
||||||||||||||
|
The ScrollBackward method scrolls the data window backward through trend time. |
||||||||||||||
|
The ScrollForward method scrolls the data window forward through trend time. |
||||||||||||||
|
The Select method selects the tool or control. "True" to select, "false" to deselect. Can be used with [ContextMenuAutoSelect]. |
||||||||||||||
|
SelectNote |
SelectNote selects a note item in the Trend Tool. Both this method and the Note Feed Tool method SetSelection must be called in order for a Trend Tool and a Note Feed Tool to synchronize. This method fires this tool's EventNoteSelected event. |
|||||||||||||
|
SetAlarmLimitInfoXml |
The SetAlarmLimitInfoXml method sets the trend’s alarm limit configuration XML string. |
|||||||||||||
|
The SetCurSel method sets the current selection index. Returns -1 if the index is not found, otherwise returns the index. |
||||||||||||||
|
The SetEndPoints method sets the position of the lines endpoints: (X1, Y1) and (X2, Y2). Distances are in pixels from the top and left edges of TheView. |
||||||||||||||
|
The SetFocus method sets the focus to the control. |
||||||||||||||
|
SetMaximizedCheck |
The SetMaximizedCheck method sets the check next to the Maximized context menu item. |
|||||||||||||
|
The SetMenuItem method is called to control an item in the context menu for the tool. |
||||||||||||||
|
The SetPoint method sets the position of a point along the path. Point is the index of the point to set, numbered 0 to N-1. The values X and Y are the new left and top positions of the point. |
||||||||||||||
|
SetSelectedAlarmLimitSeries |
The SetSelectedAlarmLimitSeries method changes or sets the series for which to display alarm limits. |
|||||||||||||
|
The SetSubMenuItem method is called to control an item in a nested sub-menu in the context menu for the tool. The parameters that are passed in include:
|
||||||||||||||
|
The SetPoint method sets the text in the box to NewText. |
||||||||||||||
|
The ShowMaximized method displays the screen in maximized state. |
||||||||||||||
|
The ShowMinimized method displays the screen in minimized state. |
||||||||||||||
|
The ShowRestored method displays the screen in normal (restored) state. |
||||||||||||||
|
The TextValue method returns the text of the current selection. |
||||||||||||||
|
UseCygNetMaximize |
||||||||||||||
|
The Value method gets the text of the currently selected item. Returns an empty string if no item is selected. |
||||||||||||||
|
The WriteToFile method writes the trend to a file. |
||||||||||||||
|
The X method returns an object that lists properties and methods specific to an ActiveX control. This method is only available for some ActiveX controls. |